package com.qiwx.pigeon.activity.home;

import android.util.Log;

import com.qiwx.pigeon.R;
import com.qiwx.pigeon.Utils.DateTimeUtils;
import com.qiwx.pigeon.activity.MainActivity;
import com.qiwx.pigeon.base.BaseMVPActivity;
import com.qiwx.pigeon.base.BasePresenter;
import com.qiwx.pigeon.data.params.ChartParam;
import com.qiwx.pigeon.data.vo.CageProduceBean;
import com.qiwx.pigeon.data.vo.EggLoseBean;
import com.qiwx.pigeon.data.vo.LayEggAmountBean;
import com.qiwx.pigeon.data.vo.QueryCageBean;
import com.qiwx.pigeon.data.vo.QueryFertilizedBean;
import com.qiwx.pigeon.data.vo.SummaryOther;
import com.qiwx.pigeon.data.vo.pageinfo.PageInfo;
import com.qiwx.pigeon.presenter.QueryCagePresenter;
import com.qiwx.pigeon.viewinterface.IQueryCageView;

import java.lang.ref.WeakReference;
import java.util.List;

/**
 * @description
 * @Author qiwx
 * @Date 2020-07-03 14:05
 * 鸽场查询
 **/
public class FactoryQueryActivity extends BaseMVPActivity<IQueryCageView, QueryCagePresenter> implements IQueryCageView {


    @Override
    public int getLayoutId() {
        return R.layout.activity_factory_query;
    }

    @Override
    public void initAfterOnCreate() {
        ChartParam param=new ChartParam();
        param.setWh_id(MainActivity.wh_id);
        param.setStart_date("2020-01-01");
        param.setEnd_date(DateTimeUtils.getCurrentDateStr());
        mPresenter.queryLayEggAmount(param);

    }


    @Override
    public void onSearchSuccess(CageProduceBean bean) {

    }

    @Override
    public void onQueryCageSuccess(PageInfo<CageProduceBean> bean) {

    }

    @Override
    public void onQueryLayEggSuccess(List<LayEggAmountBean> data) {
        Log.e("TAG",data.size()+"----");

    }

    @Override
    public void onQueryEggLoseSuccess(List<EggLoseBean> data) {

    }

    @Override
    public void onQueryShoujSuccess(List<QueryFertilizedBean> data) {

    }

    @Override
    public void onQueryOtherSuccess(List<SummaryOther> data) {

    }

    @Override
    public void onAddCageEliminateSuccess(int type) {

    }

    @Override
    public void onFailure(String error) {

    }

    @Override
    public QueryCagePresenter createPresenter() {
        return new QueryCagePresenter(new WeakReference(this));
    }
}
